package edu.zut.bailan.student.service.impl;

import edu.zut.bailan.base.service.impl.GenericManagerImpl;
import edu.zut.bailan.student.domain.StudentFeedBack;
import edu.zut.bailan.student.dao.StudentFeedBackDao;
import edu.zut.bailan.student.service.StudentFeedbackManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class StudentFeedbackManagerImpl extends GenericManagerImpl<StudentFeedBack, Long>
        implements StudentFeedbackManager {

    StudentFeedBackDao studentFeedBackDao;

    @Autowired
    public void setStudentFeedBackDao(StudentFeedBackDao studentFeedBackDao) {
        this.studentFeedBackDao = studentFeedBackDao;
        this.dao = this.studentFeedBackDao;
    }

    @Override
    public List<StudentFeedBack> findByStudent(String studentId) {
        List<StudentFeedBack> all = new ArrayList<StudentFeedBack>();
        for (int i = 0; i < 10; i++) {
            StudentFeedBack feedback = new StudentFeedBack();
            all.add(feedback);
        }
        return all;
    }

}
